<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../Another/Style/jquery-ui.css"/>
<script type="text/javascript" src="../Another/JQuery/jquery1.9.2.min.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery_ui.js"></script>
<link rel="stylesheet" type="text/css" href="../Another/Style/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="../Another/Style/bootstrap-responsive.css"/>
<script type="text/javascript" src="../Another/JQuery/bootstrap-transition.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-alert.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-modal.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-dropdown.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-scrollspy.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tab.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-tooltip.js"></script>
<script type="text/javascript" src="../Another/JQuery/bootstrap-popover.js"></script>
<script type="text/javascript" src="../Another/JQuery/jquery.validate.js"></script>
<style>
.control-label{
	margin-left: 100px;
	margin-right: 10px;
}
</style>
<script type="text/javascript">
	  $(document).ready(function(){
			$('input').hover(function()
			{
			$(this).popover('show')
		});
			$("#registerHere").validate({
				rules:{
					MatKhauCu:"required",
					NhapLaiMatKhau:{
						required:true,
						equalTo:"#MatKhau"
					},
					MatKhau:{
						required:true,
						minlength: 6
					},
				},
				messages:{
					MatKhauCu:"Chưa nhập mật khẩu củ",
					NhapLaiMatKhau:{
						required:"Chưa nhập lại mật khẩu",
						equalTo:"nhập lại không trùng khớp!"
					},
					MatKhau:{
						required:"Mật khẩu không được để trống",
						minlength:"Mật khẩu phải có tối thiểu 6 ký tự"
					},
					
				},
				errorClass: "help-inline",
				errorElement: "span",
				highlight:function(element, errorClass, validClass) {
					$(element).parents('.control-group').addClass('error');
				},
				unhighlight: function(element, errorClass, validClass) {
					$(element).parents('.control-group').removeClass('error');
					$(element).parents('.control-group').addClass('success');
				}
			});
		});
</script>

	<form class="form-horizontal" id="registerHere" method='post' action="../MyControl/doimatkhau.php">
	  <fieldset>
	    <legend> Thông tin cá nhân</legend>
	    
	
	 <div class="control-group">
		<label class="control-label" for="input01">Mật khẩu củ</label>
	      <div class="controls">
	        <input type="password" class="input-xlarge" id="MatKhauCu" name="MatKhauCu" rel="popover" />
	       
	      </div>
	</div>
    
	
	<div class="control-group">
		<label class="control-label" for="input01">Mật khẩu mới</label>
	      <div class="controls">
	        <input type="password" class="input-xlarge" id="MatKhau" name="MatKhau" rel="popover" />
	       
	      </div>
	</div>
    
     <div class="control-group">
		<label class="control-label" for="input01">Nhâp lại mật khẩu</label>
	      <div class="controls">
	        <input type="password" class="input-xlarge" id="NhapLaiMatKhau" name="NhapLaiMatKhau" rel="popover" />
	       
	      </div>
	</div>
   
	<div class="control-group">
		<label class="control-label" for="input01"></label>
	      <div class="controls">
	       <button type="submit" class="btn btn-success" rel="tooltip" title="first tooltip" name="Submit">Lưu lại</button>
	</div>
	</fieldset>
	</form>
    <?php
	if(isset($_REQUEST['ERROR']))
	{		
			echo"<font color='#FF0000' size='+2'>"."&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			Mật khẩu củ chưa chính xác!"."</font>";
	}
?>


